#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include "iteratorTest.h"
using namespace std;


void com::example::testone::stl::test1(){
    cout << "testone....." << endl;
    int iArr[] = {1, 2 , 3, 4 , 7, 8, 9 , 5, 6};
    auto beginMy = std::begin(iArr);
    auto endMy = std::end(iArr);
    for(; beginMy != endMy; ++beginMy){
        cout << *beginMy << endl;
    }
}

void com::example::testone::stl::test2(){
    vector<string> v;
    v.push_back("1");
    v.push_back("2");
    v.push_back("3");
    v.push_back("10");
    v.push_back("11");
    v.push_back("12");

    std::sort(std::begin(v), std::end(v), [](string s1, string s2){
                return s1 < s2;
              });
    for(auto it = std::begin(v); it != std::end(v); ++it){
        cout << *it << endl;
    }
}
